import { useDispatch, useSelector } from 'react-redux'
import type { TypedUseSelectorHook } from 'react-redux'
import type { RootState, AppDispatch } from './store'

/* 
说明: 纯模板代码, 写好不用再动
定义了针对当前管理的state数据的useDispatch与useSelector
*/

// 当前应用的useDispatch
export const useAppDispatch: () => AppDispatch = useDispatch

// 当前应用的useSelector
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector